<?php

$pack=$_GET['packname'];
$project=$_GET['project_name'];
$current_dir=$_GET['current_dir'];

if($current_dir==""){

}

else{
$current_dir=$current_dir."/";
}

unlink('../projects/'.$project.'/application/controller/'.$current_dir.$pack.".php");
unlink('../projects/'.$project.'/application/model/'.$current_dir.$pack.".php");
unlink('../projects/'.$project.'/application/view/'.$current_dir.$pack.".php");
unlink('../projects/'.$project.'/application/event_handler/'.$current_dir.$pack.".php");
require "../lib.dir.php";

$packages=get_packages($project, $current_dir,"../");

$p=json_encode($packages);

echo "Package was successfully deleted.";
